<template>
  <div>

    <el-form class="viewForm" label-width="80px">
      <el-row>
        <el-col :span="24">
          <el-form-item label="头像">
            <img :src="viewModel.avatar" style="width: 35px;height: auto;margin: 5px;"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="姓名">
            <div v-html="viewModel.name"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="性别">
            <div v-html="viewModel.sex"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="余额">
            <div v-html="viewModel.tradeAccount"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="冻结金额">
            <div v-html="viewModel.frozenAccount"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="出生日期">
            <div v-html="viewModel.birthDay"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="身高">
            <div v-html="viewModel.height"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="体重">
            <div v-html="viewModel.weight"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="电话">
            <div v-html="viewModel.phone"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="城市">
            <div v-html="viewModel.cityName"></div>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="微信号">
            <div v-html="viewModel.wxNo"></div>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="照片">
            <img v-if="viewModel.lifePhoto!=null" :src="viewModel.lifePhoto" class="logoImage"/>
            <img v-if="viewModel.modelPhoto!=null" :src="viewModel.modelPhoto" class="logoImage"/>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import common from "@/mixins/common.js";

var config = {};
config.methods = {};
config.mixins = [common];

config.data = function () {
  return {
    viewModel: {},
    activeIndex: "1"
  }
};
config.mounted = function () {
  var id = this.$route.query.id;
  var self = this;
  var data = {};
  data.id = id;
  this.postData("/tenantRest/staff/view.htm", data, function (res) {
    if (res.code == 0) {
      self.viewModel = res;
    }
  });
}

export default config;
</script>

<style scoped>
.logoImage {
  width: 300px;
  height: auto;
  margin-right: 15px;
}
</style>
